package com.ruoyi.labdata.controller;

import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.labdata.domain.LabInstrumentShift;
import com.ruoyi.labdata.service.ILabInstrumentShiftService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;

/**
 * 仪器迁移Controller
 * 
 * @author winner pan
 * @date 2022-03-02
 */
@RestController
@RequestMapping("/labdata/instrumentShift")
public class LabInstrumentShiftController extends BaseController {
	@Autowired
	private ILabInstrumentShiftService labInstrumentShiftService;

	/**
	 * 查询仪器迁移列表
	 */
	// @PreAuthorize("@ss.hasPermi('labdata:instrumentShift:list')")
	/*@GetMapping("/list")
	public TableDataInfo list(LabInstrumentShift labInstrumentShift) {
		startPage();
		List<LabInstrumentShift> list = labInstrumentShiftService.selectLabInstrumentShiftList(labInstrumentShift);
		return getDataTable(list);
	}*/

	/**
	 * 导出仪器迁移列表
	 */
	// @PreAuthorize("@ss.hasPermi('labdata:instrumentShift:export')")
	/*@Log(title = "仪器迁移", businessType = BusinessType.EXPORT)
	@GetMapping("/export")
	public AjaxResult export(LabInstrumentShift labInstrumentShift) {
		List<LabInstrumentShift> list = labInstrumentShiftService.selectLabInstrumentShiftList(labInstrumentShift);
		ExcelUtil<LabInstrumentShift> util = new ExcelUtil<LabInstrumentShift>(LabInstrumentShift.class);
		return util.exportExcel(list, "instrumentShift");
	}*/

	/**
	 * 获取仪器迁移详细信息
	 */
	// @PreAuthorize("@ss.hasPermi('labdata:instrumentShift:query')")
	/*@GetMapping(value = "/{shiftId}")
	public AjaxResult getInfo(@PathVariable("shiftId") Long shiftId) {
		return AjaxResult.success(labInstrumentShiftService.selectLabInstrumentShiftById(shiftId));
	}*/

	/**
	 * 新增仪器迁移
	 */
	@PreAuthorize("@ss.hasPermi('labdata:instrumentShift:edit')")
	@Log(title = "仪器迁移", businessType = BusinessType.INSERT)
	@PostMapping
	public AjaxResult add(@RequestBody LabInstrumentShift labInstrumentShift) {
		return toAjax(labInstrumentShiftService.insertLabInstrumentShift(labInstrumentShift));
	}

	/**
	 * 修改仪器迁移
	 */
	/*@PreAuthorize("@ss.hasPermi('labdata:instrumentShift:edit')")
	@Log(title = "仪器迁移", businessType = BusinessType.UPDATE)
	@PutMapping
	public AjaxResult edit(@RequestBody LabInstrumentShift labInstrumentShift) {
		return toAjax(labInstrumentShiftService.updateLabInstrumentShift(labInstrumentShift));
	}*/

	/**
	 * 删除仪器迁移
	 */
	// @PreAuthorize("@ss.hasPermi('labdata:instrumentShift:remove')")
	/*@Log(title = "仪器迁移", businessType = BusinessType.DELETE)
	@DeleteMapping("/{shiftIds}")
	public AjaxResult remove(@PathVariable Long[] shiftIds) {
		return toAjax(labInstrumentShiftService.deleteLabInstrumentShiftByIds(shiftIds));
	}*/
}
